

(function($) {
	$.fn.validationEngineLanguage = function() {};
	$.validationEngineLanguage = {
		newLang: function() {
			$.validationEngineLanguage.allRules = 	{"required":{    			// Add your regex rules here, you can take telephone as an example
						"regex":"none",
						"alertText":"* \u8be5\u9879\u4e3a\u5fc5\u586b\u9879",
						"alertTextCheckboxMultiple":"* \u8bf7\u9009\u62e9",
						"alertTextCheckboxe":"* \u8bf7\u9009\u62e9"},
					"length":{
						"regex":"none",
						"alertText":"* ",
						"alertText2":" - ",
						"alertText3": " \u5b57\u7b26\u6216\u6570\u5b57\u7ec4\u5408"},
					"maxCheckbox":{
						"regex":"none",
						"alertText":"* 您选取的选项过多，请重新选择"},	
					"minCheckbox":{
						"regex":"none",
						"alertText":"* 您选取的选项过少,至少选择 ",
						"alertText2":" 项"},	
					"confirm":{
						"regex":"none",
						"alertText":"* 您两次填写的内容不完全一致，请重新填写"},	
//从telephone往下，除了validate2fields，都需要写成如：custom[telephone]的样式
//custom与funcCall的差别在于，custom是使用正则表达式进行验证即可，而funcCall需要写js函数来进行验证。				
					"telephone":{
						"regex":"\d{3}-\d{8}|\d{4}-\d{7}|\d{8}|\d{7}",
						"alertText":"* \u60a8\u8f93\u5165\u7684\u53f7\u7801\u65e0\u6548"},
					"email":{
						"regex":"/^[a-zA-Z0-9_\.\-]+\@([a-zA-Z0-9\-]+\.)+[a-zA-Z0-9]{2,4}$/",
						"alertText":"* \u60a8\u8f93\u5165\u7684\u90ae\u7bb1\u5730\u5740\u65e0\u6548"},
					"date":{
                         "regex":"/^[0-9]{4}\-\[0-9]{1,2}\-\[0-9]{1,2}$/",
                         "alertText":"* \u65e5\u671f\u683c\u5f0f\u9519\u8bef,\u9700yyyy-mm-dd\u683c\u5f0f"},
					"onlyNumber":{
						"regex":"/^[0-9\ ]+$/",
						"alertText":"* \u53ea\u80fd\u8f93\u5165\u6570\u5b57"},
					"noSpecialCaracters":{
						"regex":"/^[0-9a-zA-Z]+$/",
						"alertText":"* \u8be5\u9879\u53ea\u63a5\u53d7\u6570\u5b57\u548c\u5b57\u6bcd\u7684\u8f93\u5165"},
					/*"ajaxUser":{
						"file":"validateUser.php",
						"extraData":"name=eric",
						"alertTextOk":"* 恭喜，用户名可用",	
						"alertTextLoad":"* 正在验证，请等待",
						"alertText":"* 该用户名已被占用，请换个名字试试"},	
					"ajaxName":{
						"file":"validateUser.php",
						"alertText":"* 该用户名已被占用，请换个名字试试",	
						"alertTextOk":"* 恭喜，用户名可用",	
						"alertTextLoad":"* 正在验证，请等待"},*/
					"onlyLetter":{
						"regex":"/^[a-zA-Z\ \']+$/",
						"alertText":"* \u53ea\u80fd\u8f93\u5165\u5b57\u6bcd"},
					"validate2fields":{
    					"nname":"validate2fields",
    					"alertText":"* You must have a firstname and a lastname"}	
					}	
					
		}
	}
})(jQuery);

$(document).ready(function() {	
	$.validationEngineLanguage.newLang()
});